﻿using System.Windows;
using System.Windows.Controls;

namespace Hibiku.Views
{
    /// <summary>
    /// Interaction logic for OAuthPinView.xaml
    /// </summary>
    public partial class InputPinView : Window
    {
        public string Pin
        {
            get { return m_pinInputBox.Text.Trim(); }
        }

        public InputPinView()
        {
            InitializeComponent();
        }

        private void HandleClick(object sender, RoutedEventArgs e)
        {
            DialogResult = true;
        }

        private void HandleTextChanged(object sender, TextChangedEventArgs e)
        {
            m_authorizeButton.IsEnabled = Pin.Length > 0;
        }
    }
}
